<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>Document</title>
    </head>
    <body>
        <div id="app">
            <button @click="increase">increase</button>
            <button @click="stop">stop</button>
            <br />
            {{ count }}
        </div>
        <script type="module">
            import {
                createApp,
                ref,
                watchEffect,
            } from "./node_modules/vue/dist/vue.esm-browser.js";

            createApp({
                setup() {
                    const count = ref(0);
                    const stop = watchEffect(() => {
                        console.log(count.value);
                    });
                    return {
                        count,
                        stop,
                        increase: () => {
                            count.value++;
                        },
                    };
                },
            }).mount("#app");
        </script>
    </body>
</html>
